package com.sz.admin.chatmessage.pojo.po;

import com.mybatisflex.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.io.Serial;
import com.sz.mysql.EntityChangeListener;

/**
* <p>
* 私聊消息记录
* </p>
*
* @author sz-admin
* @since 2025-06-30
*/
@Data
@Table(value = "chat_message", onInsert = EntityChangeListener.class, onUpdate = EntityChangeListener.class)
@Schema(description = "私聊消息记录")
public class ChatMessage implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    @Schema(description ="消息ID（发送时间6位yy-mm-dd + 发送者ID12位 + 接收者ID12位 + 序列号6位）")
    private String messageId;

    @Schema(description ="发送者ID")
    private String senderId;

    @Schema(description ="接收者ID")
    private String receiverId;

    @Schema(description ="消息类型: 0=文本 1=图片")
    private Integer messageType;

    @Schema(description ="消息内容（文本内容或图片URL）")
    private String content;

    @Schema(description ="图片存储位置（仅当消息类型为图片时使用）")
    private String imagePath;

    @Schema(description ="创建时间 (格式: yy-mm-dd:hh-mm-ss)")
    private String createdAt;

    @Schema(description ="更新时间 (格式: yy-mm-dd:hh-mm-ss)")
    private String updatedAt;

    @Schema(description ="")
    private Integer isDeleted;

}